<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test2.aspx.cs" Inherits="ProjektZespolowy.Test2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
    <div>

<script language="javascript" type="text/javascript">
function f()
{
    //alert('f');
    if (document.getElementById('<%=ddlArtType.ClientID%>').value == '1')
	{
	    document.getElementById("textDiv").style.display = "block";
	    document.getElementById("photoDiv").style.display = "none"; 
	    document.getElementById("binaryDiv").style.display = "none"; 
	           
        document.getElementById('<%=lblArtType.ClientID%>').innerHTML = "Tekst";
	}
	else if (document.getElementById('<%=ddlArtType.ClientID%>').value == '2')
	{
	    document.getElementById("textDiv").style.display = "none";
	    document.getElementById("photoDiv").style.display = "block"; 
	    document.getElementById("binaryDiv").style.display = "none"; 
        
        document.getElementById('<%=lblArtType.ClientID%>').innerHTML = "Grafika";
	}
	else if (document.getElementById('<%=ddlArtType.ClientID%>').value == '3')
	{
	    document.getElementById("textDiv").style.display = "none";
	    document.getElementById("photoDiv").style.display = "none"; 
	    document.getElementById("binaryDiv").style.display = "block"; 
        
        document.getElementById('<%=lblArtType.ClientID%>').innerHTML = "Binaria";
	}
}
</script> 

<asp:DropDownList ID="ddlArtType" runat="server" Width="450px" onchange="f()">
    <asp:ListItem>1</asp:ListItem>
    <asp:ListItem>2</asp:ListItem>
    <asp:ListItem>3</asp:ListItem>
</asp:DropDownList>


<asp:Label ID="lblArtType" runat="server"></asp:Label><br />
        
<div id="textDiv" style="display: inline">
    <asp:TextBox ID="txtText" runat="server" Rows="20" TextMode="MultiLine" Width="450px"></asp:TextBox>
</div>
<div id="photoDiv" style="display: none">
    <asp:FileUpload ID="FileUploadPhoto" runat="server" Width="450px" />&nbsp;
</div>
<div id="binaryDiv" style="display: none">
    <asp:FileUpload ID="FileUploadBinary" runat="server" Width="450px" />&nbsp;
</div>
            
   



    </div>
    </form>
</body>
</html>
